package com.augurit.common.workdayholiday.model;

public class Week {
	
	public final static Week Sunday = new Week(1, "星期日");
	public final static Week Monday = new Week(2, "星期一");
	public final static Week Tuesday = new Week(3, "星期二");
	public final static Week Wendsday = new Week(4, "星期三");
	public final static Week Thursday = new Week(5, "星期四");
	public final static Week Friday = new Week(6, "星期五");
	public final static Week Saturday = new Week(7, "星期六");
	
	
	
	private int dayOfWeek;
	private String description;
	
	private Week(int dayOfWeek, String description){
		this.dayOfWeek = dayOfWeek;
		this.description = description;
	}
	
	public int getDayOfWeek() {
		return dayOfWeek;
	}
	public void setDayOfWeek(int dayOfWeek) {
		this.dayOfWeek = dayOfWeek;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	public static Week get(int dayOfWeek){
		assert( dayOfWeek >=1 && dayOfWeek <= 7);
		switch(dayOfWeek){
			case 1:
				return Sunday;
			case 2:
				return Monday;
			case 3:
				return Tuesday;
			case 4:
				return Wendsday;
			case 5:
				return Thursday;
			case 6:
				return Friday;
			default:
				return Saturday;
		}
	}
}
